<?php

namespace App\Transformers;


use App\Models\PhoneSetting;
use League\Fractal\TransformerAbstract;

class PhoneSettingTransformer extends TransformerAbstract
{

    public function transform(PhoneSetting $phoneSetting)
    {
        return [
            'id' => $phoneSetting->id,
            'type' => $phoneSetting->type,
            'account' => $phoneSetting->account,
            'auth_token' => $phoneSetting->auth_token,
            'site' => $phoneSetting->site,
            'alias' => $phoneSetting->alias,
            'status' => $phoneSetting->status,
            'balance' => $phoneSetting->balance,
            'created_at' =>$phoneSetting->created_at->toDateTimeString(),
            'updated_at' => $phoneSetting->updated_at->toDateTimeString(),
        ];
    }
}